<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>

                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">普通用户</div>
                            </div>
                            <div class="am-form-group" style="display:none">
                                <div class="am-u-sm-9">
                                    <input type="number" min="0" max="100" class="tpl-form-input"
                                           name="id"
                                           value="<?= $data['id'] ?>" required>

                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    分销比例
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="number" min="0" max="100" class="tpl-form-input"
                                           name="common[dealer_percent]"
                                           value="<?= $data['common']['dealer_percent'] ?>"  required>
                                    <small>分销比例范围 0% - 100%,单位：%</small>
                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 消费赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[face_status]"
                                               value="1" data-am-ucheck <?= $data['common']['face_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[face_status]"
                                               value="2" data-am-ucheck <?= $data['common']['face_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 商品赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[product_status]"
                                               value="1" data-am-ucheck <?= $data['common']['product_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[product_status]"
                                               value="2" data-am-ucheck <?= $data['common']['product_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 储值卡赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[card_status]"
                                               value="1" data-am-ucheck <?= $data['common']['card_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[card_status]"
                                               value="2" data-am-ucheck <?= $data['common']['card_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 爆品礼赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[gifts_status]"
                                               value="1" data-am-ucheck <?= $data['common']['gifts_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="common[gifts_status]"
                                               value="2" data-am-ucheck <?= $data['common']['gifts_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>

                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">代言人</div>
                            </div>
                            <div class="am-form-group" style="display:none">
                                <div class="am-u-sm-9">
                                    <input type="number" min="0" max="100" class="tpl-form-input"
                                           name="id"
                                           value="<?= $data['id'] ?>" required>

                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    分销比例
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="number" min="0" max="100" class="tpl-form-input"
                                           name="staff[dealer_percent]"
                                           value="<?= $data['staff']['dealer_percent'] ?>"  required>
                                    <small>分销比例范围 0% - 100%,单位：%</small>
                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 消费赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[face_status]"
                                               value="1" data-am-ucheck <?= $data['staff']['face_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[face_status]"
                                               value="2" data-am-ucheck <?= $data['staff']['face_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 商品赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[product_status]"
                                               value="1" data-am-ucheck <?= $data['staff']['product_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[product_status]"
                                               value="2" data-am-ucheck <?= $data['staff']['product_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 储值卡赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[card_status]"
                                               value="1" data-am-ucheck <?= $data['staff']['card_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[card_status]"
                                               value="2" data-am-ucheck <?= $data['staff']['card_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 爆品礼赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[gifts_status]"
                                               value="1" data-am-ucheck <?= $data['staff']['gifts_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="staff[gifts_status]"
                                               value="2" data-am-ucheck <?= $data['staff']['gifts_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>


                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">微股东</div>
                            </div>


                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    分销比例
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="number" min="0" max="100" class="tpl-form-input"
                                           name="wgd[dealer_percent]"
                                           value="<?= $data['wgd']['dealer_percent'] ?>"  required>
                                    <small>分销比例范围 0% - 100%,单位：%</small>
                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 消费赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[face_status]"
                                               value="1" data-am-ucheck <?= $data['wgd']['face_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[face_status]"
                                               value="2" data-am-ucheck <?= $data['wgd']['face_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 商品赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[product_status]"
                                               value="1" data-am-ucheck <?= $data['wgd']['product_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[product_status]"
                                               value="2" data-am-ucheck <?= $data['wgd']['product_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 储值卡赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[card_status]"
                                               value="1" data-am-ucheck <?= $data['wgd']['card_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[card_status]"
                                               value="2" data-am-ucheck <?= $data['wgd']['card_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 爆品礼赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[gifts_status]"
                                               value="1" data-am-ucheck <?= $data['wgd']['gifts_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="wgd[gifts_status]"
                                               value="2" data-am-ucheck <?= $data['wgd']['gifts_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>


                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">会员</div>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="help-block">
                                        <small>注：会员的分销比例请前往 <a href="<?= url('market.card.card/index') ?>">[营销管理 - 储值卡]</a>  中设置</small>
                                    </div>
                                </div>
                            </div>


                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 消费赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[face_status]"
                                               value="1" data-am-ucheck <?= $data['vip']['face_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[face_status]"
                                               value="2" data-am-ucheck <?= $data['vip']['face_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 商品赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[product_status]"
                                               value="1" data-am-ucheck <?= $data['vip']['product_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[product_status]"
                                               value="2" data-am-ucheck <?= $data['vip']['product_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 储值卡赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[card_status]"
                                               value="1" data-am-ucheck <?= $data['vip']['card_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[card_status]"
                                               value="2" data-am-ucheck <?= $data['vip']['card_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>
                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 爆品礼赏金状态 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[gifts_status]"
                                               value="1" data-am-ucheck <?= $data['vip']['gifts_status'] == '1' ? 'checked' : '' ?>
                                        >
                                        开启
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="vip[gifts_status]"
                                               value="2" data-am-ucheck <?= $data['vip']['gifts_status'] == '2' ? 'checked' : '' ?>
                                        >
                                        关闭
                                    </label>

                                </div>
                            </div>

                            <div class="am-form-group am-padding-top">
                                <label class="am-u-sm-3 am-form-label form-require"> 是否使用该方案 </label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="dealerCase"
                                               value="2" data-am-ucheck <?= $dealerCase == '2' ? 'checked' : '' ?>
                                        >
                                        是
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="dealerCase"
                                               value="0" data-am-ucheck <?= $dealerCase != '2' ? 'checked' : '' ?>
                                        >
                                        否
                                    </label>
                                </div>
                            </div>

                            <!-- 表单提交按钮 -->
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>

                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script src="assets/common/plugins/laydate/laydate.js"></script>
<script src="assets/store/js/select.data.js?v=<?= $version ?>"></script>
<script>
    $(function () {

        // 时间选择器
        laydate.render({
            elem: '.j-laydate-start'
            , type: 'datetime'
        });
        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();



    });


    function clearNoNum(obj){
        obj.value = obj.value.replace(/[^\d.]/g,"");  //清除“数字”和“.”以外的字符
        obj.value = obj.value.replace(/^\./g,"");  //验证第一个字符是数字而不是.
        obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个. 清除多余的.
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
    }
</script>
